function debugObj(obj) {
	var s = "";
	for (k in obj) {
		s += k + "=" + obj[k] + "\n";
	}
	alert(s);
}
var right = null;
var init = function() {
	var viewport = new Ext.Viewport({
				// layout : 'absolute',
				layout : 'border',
				listeners : {
					'resize' : function(e, adjWidth, adjHeight, rawWidth,
							rawHeight) {
						// alert('resize' + document.body.clientWidth);
						alert('e:\n' + e + '\n\nadjWidth:\n' + adjWidth
								+ '\n\nadjHeight:\n' + adjHeight
								+ '\n\nrawWidth:\n' + rawWidth
								+ '\n\nrawHeight :\n' + rawHeight);
						if (null != rawWidth && rawWidth != 'undified') {
							alert('adjWidth\n' + adjWidth);
							var curWidth = (adjWidth - 800);
							if (curWidth <= 0) {
								curWidth = 0;
								window.location.reload();
							} else {
								e.items.items[0].x = curWidth / 2;
								window.location.reload();
							}
						}
					}
				},
				items : [{
					height : 52,
					region : 'north',
					layout : "fit",
					y : 0,
					x : (document.body.clientWidth - 800) < 0
							? 0
							: (document.body.clientWidth - 800) / 2,
					items : [new Ext.Panel({
								title : 'top2top2top2top2top2top2',
								html : 'tttttttttttttttttttttttttttttttttttttop'
							})]
				}, {
					margins : '52 -200 200 0',
					region : 'center',
					layout : "fit",
					items : [new Ext.Panel({
								title : 'c1',
								html : 'c'
							})]
				}, {
					region : 'west',
					split : true,
					rootVisible : false,
					lines : false,
					minSize : 60,
					maxSize : 690,
					autoScroll : true,
					animCollapse : true,
					animate : true,
					collapsible : true,
					collapseMode : 'mini',
					height : 290,
					width : 120,
					items : [new Ext.Panel({
								title : 'west',
								html : 'wwwwest'
							})]
				}]
			});
}